using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for Common
/// </summary>
public class Common
{


    public static  string GetActualFileName(string value)
    {
        string str = (string)value;
        str = str.Remove(0, str.LastIndexOf("/") + 1);
        str = str.Remove(0, str.IndexOf("_") + 1);
        return str;
    }

    public static string GetNewFileName(int UserID, string newfilename, string year)
    {
        return "UploadedDocuments/" + year + "/" + UserID.ToString() + "_" + newfilename;
    }

    public static void SendMailMessage(string to, string cc, string bcc, string subject, string body)
    {
        MailWebService.MailHelper mh = new MailWebService.MailHelper();    
        mh.SendMailMessage(to, cc, bcc, subject, body);
    }
}
